
#import "YLViewVC.h"
#import "YLView.h"

@interface YLViewVC ()
@property (weak, nonatomic) IBOutlet YLView *viewRemove;
@end

@implementation YLViewVC

- (IBAction)onPressRemoveSubViews:(id)sender {
    // 移除所有子视图
    [self.viewRemove removeSubviews];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // 代码创建方式
    [self addMyView];
}


-(void)addMyView{
    YLView *view = [[YLView alloc]initWithFrame:CGRectMake(200, 20, 80, 40)];
    view.backgroundColor = [UIColor yellowColor];
    // 圆角弧度
    view.cornerRadius = 10;
    // 圆形
    // view.isRound = YES;
    // 边框颜色
    view.borderColor = [UIColor redColor];
    // 边框宽度
    view.borderWidth = 4.0f;
    [self.view addSubview:view];
}

@end
